Download the .pkg file.
Double-click it or select it and use the keyboard shortcut CMD + O.
Every app has its own conditions and special information for initiating an install, so be sure to read things thoroughly as you proceed through the installation.
After clicking Continue, you may be asked which disc you wish to install the app or service on. Beware that installing it on an external hard drive has not fared well for many. There’s a big disconnect between the drives at times and if you forget to plug in the external one, things may become corrupted. If it’s a separate partition, things should work okay, but there’s still a risk of problems.
You can have a look at this tutorial How to Install and Remove Apps for general instructions on installing Mac OS X applications.
If you have a message that installations are only accepted for programs from qualified developers, navigate to Applications in Finder, Control-click OpenCPN.app, select Open from the context menu and confirm that you want to start it in the displayed dialog.
To save a previously installed version rename the app in the Applications directory before installing the new version.
If OpenCPN.app is replaced, the installed plugins will not be there anymore and have to be re-installed on the new OpenCPN.app. The userdata of the plugins will still be there.
Also for MacOS Mojave see CF thread http://www.cruisersforum.com/forums/f134/open-cpn-kind-of-a-mess-on-mojave-228973.html
For MacOS Catalina there are some issues, but look at this CF post http://www.cruisersforum.com/forums/f134/oesenc-does-not-download-to-plugins-on-opencpn-228875.html#post3054084